{% extends "front/base.html" %}
{% from "common/_macro.html" import static %}

{% block head %}
    <link rel="stylesheet" href="{{ static("front/css/setting.css") }}">
    <script src="{{ static("front/js/setting.js") }}"></script>
    <script src="{{ static("common/js/jsAddress.js") }}"></script>
    <script></script>
      	<script type="text/javascript">
	$(document).ready(function(){
		addressInit('cmbProvince', 'cmbCity', 'cmbArea');
		});
  	</script>
{% endblock %}

{% block body %}
    <div class="main_contener">
        <div class="col-md-4">
            <div class="tab">
                <a class="tablinks set-base" href="{{ url_for("front.setting_base") }}"><i
                        class="layui-icon layui-icon-username"></i><span>个人资料</span></a>
                <a class="tablinks set-pro" href="{{ url_for("front.setting_profile") }}"><i
                        class="layui-icon layui-icon-username"></i><span>隐私设置</span></a>
                <a class="tablinks set-cou" href="{{ url_for("front.setting_count") }}"><i
                        class="layui-icon layui-icon-username"></i><span>账号设置</span></a>
            </div>

        </div>
        <div class="col-md-8">
            <table>
                <thead>
                <tr></tr>
                </thead>
                <tbody>
                <tr>
                    <td><img id="my_avatar"
                            src="{{ g.front_user.avatar }}"
                            alt=""></td>
                    <td class="ri-td">
                        <a class="btn btn-hollow" id="change-avater-btn">
                            <input class="hide" type="file" id="avater" data-type="change_user" accept="image/gif,image/jpg,image/jpeg,image/bmp,image/png">更换头像
                        </a>
                    </td>
                </tr>
                <tr>
                    <td class="td-span">昵称</td>
                    <td class="ri-td"><input type="text" class="layui-input" name="nickname" value="{{ g.front_user.nickname }}"></td>
                </tr>
                <tr>
                    <td class="td-span">邮箱</td>
                    <td class="ri-td"><a class="btn btn-hollow">
                        <input class="hide">{{ g.front_user.email }}
                    </a>
                    </td>
                </tr>
                <tr>
                    <td class="td-span">我的地址</td>
                    <td class="ri-td"><i class="layui-icon layui-icon-location"></i>&nbsp;&nbsp;{{ g.front_user.address }}</td>
                </tr>
                <tr>
                    <td class="td-span">
                        更改地址
                    </td>
                    <td class="ri-td">
                        <select class="form-control" id="cmbProvince" name="cmbProvince" ></select>
                        <select class="form-control" id="cmbCity" name="cmbCity" ></select>
                        <select class="form-control" id="cmbArea" name="cmbArea" ></select>
                    </td>
                </tr>
                <tr>
                    <td class="td-span">
                        <button class="circular ui green button" id="save-btn">保存</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
{% endblock %}